
import 'dart:convert';
import 'package:ichinesereader/models/student/Assessment.dart';

StudentAssessments studentAssessmentsFromJson(String str) => StudentAssessments.fromJson(json.decode(str));

String studentAssessmentsToJson(StudentAssessments data) => json.encode(data.toJson());

class StudentAssessments {
    StudentAssessments({
        this.limit,
        this.page,
        this.count,
        this.list,
    });

    int? limit;
    int? page;
    int? count;
    List<Assessment>? list;

    factory StudentAssessments.fromJson(Map<String, dynamic> json) => StudentAssessments(
        limit: json["limit"],
        page: json["page"],
        count: json["count"],
        list:  List<Assessment>.from(json["list"].map((x) => Assessment.fromJson(x))),
    );

    Map<String, dynamic> toJson() => {
        "limit": limit,
        "page": page,
        "count": count,
        "list": list!=null ? List<dynamic>.from(list!.map((x) => x.toJson())) : null,
    };
}